﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CKFinder;
using AnnouncementManager;

namespace MyBooker
{
    public partial class Edit : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            var fileBrowser = new FileBrowser();
            fileBrowser.BasePath = "../RTE/ckfinder";
            fileBrowser.SetupCKEditor(CKEditorControlAnnouncement);
        }

        protected void ButtonAddClick(object sender, EventArgs e)
        {
            var rrrr = CKEditorControlAnnouncement.Text;
            var manager = new AnnouncementRepository();
            manager.AddAnnouncement(new Announcement {FullBody = rrrr, Time = DateTime.Now, Id = 1, Title = "11", IsNew = true});
        }
    }
}